import requests
import json

from datetime import datetime, timedelta

cookies_list = [
{
    "s_v_web_id": "verify_mhssab4k_qeb0nndW_FsBA_4n2w_85tp_w70Be4t77YKX",
    "passport_csrf_token": "422478b96966a54ed4e3e0950dfa4d12",
    "passport_csrf_token_default": "422478b96966a54ed4e3e0950dfa4d12",
    "Hm_lvt_b6520b076191ab4b36812da4c90f7a5e": "1762757474",
    "ttcid": "fec7a21c85794eddba2a1ab9550f6bf526",
    "tt_scid": "KWw2MpgIfST62-7ivMxRppwuDKzHm3ca6jtBQ1buFGfi3B5hdvG9blMVXEU-YuOe9a18",
    "passport_mfa_token": "CjfoH2Fg9vdiSaZUWlkEMkIBM5WeO5prbl7fH2FLCjX8rTizeVVtvQBZEcKaC46um4FI5OSLKTN7GkoKPAAAAAAAAAAAAABPsgHqKZC4gKElu%2Fwv9MbEtSa32kX8Iqy5Zi5u3A8SE1sOlvHhkfnGeP2Iq6kbgu2r4BCflYEOGPax0WwgAiIBAzpFSVU%3D",
    "odin_tt": "d750225a2737eaba4a864231feb9356be4f6f76015e1c7d12f2131c6eb66040e5c3237e44949f334e76d51c463b17876934055838dca7cb2623d1b2132f33698",
    "passport_auth_status": "995bdc2eac1d176ec512da03268d8d56%2C",
    "passport_auth_status_ss": "995bdc2eac1d176ec512da03268d8d56%2C",
    "uid_tt": "9610e353f5ff24b72c56f5e761c36d46",
    "uid_tt_ss": "9610e353f5ff24b72c56f5e761c36d46",
    "sid_tt": "d7803c96ad4aab7fe34fbbc3ee2cfe7a",
    "sessionid": "d7803c96ad4aab7fe34fbbc3ee2cfe7a",
    "sessionid_ss": "d7803c96ad4aab7fe34fbbc3ee2cfe7a",
    "is_staff_user": "false",
    "PHPSESSID": "c38d286d0903b1f76a70bdf64a09abe4",
    "PHPSESSID_SS": "c38d286d0903b1f76a70bdf64a09abe4",
    "ucas_c0": "CkEKBTEuMC4wEICIkdLc9eKIaRjmJiCuk-Cf3IyABSiwITDsxsCd_63gA0Cxl8bIBkixy4LLBlCavIHI7M3M_2hYbxIUXddSQPRe-5nMs_VK_ighRSSxYb0",
    "ucas_c0_ss": "CkEKBTEuMC4wEICIkdLc9eKIaRjmJiCuk-Cf3IyABSiwITDsxsCd_63gA0Cxl8bIBkixy4LLBlCavIHI7M3M_2hYbxIUXddSQPRe-5nMs_VK_ighRSSxYb0",
    "gd_random": "eyJtYXRjaCI6dHJ1ZSwicGVyY2VudCI6MC4wNjQwNjExODcwOTUzNTM2OX0=.Yga3XMVtei4ojHfupvPTUPqE3M6c7meOiIz7mgMGTEw=",
    "zsgw_business_data": "%7B%22uuid%22%3A%22ce5489c0-0602-41b6-80e8-2339199da6e0%22%2C%22platform%22%3A%22pc%22%2C%22source%22%3A%22seo.fxg.jinritemai.com%22%7D",
    "ecom_gray_shop_id": "6496821",
    "gfkadpd": "4272,23756",
    "ttwid": "1%7CEF4gPxQ21h_nvlWzkU1YsHzOCX8-UthK4Xya9w2QWFc%7C1762758156%7C36702edb91f1cee95841ece9c429875b56fc2c5ba0cebfc3b5e9955884905575",
    "BUYIN_SASID": "SID2_7570997498074333466",
    "csrf_session_id": "aa83547eda0a52a8d0177f63073f3582",
    "sid_guard": "d7803c96ad4aab7fe34fbbc3ee2cfe7a%7C1762851071%7C5183999%7CSat%2C+10-Jan-2026+08%3A51%3A10+GMT",
    "session_tlb_tag": "sttt%7C10%7C14A8lq1Kq3_jT7vD7iz-ev_________XRHZymdkWbuoL2k6dWpuM913qRA6c_0M1Wjp0vy9vg20%3D",
    "session_tlb_tag_bk": "sttt%7C10%7C14A8lq1Kq3_jT7vD7iz-ev_________XRHZymdkWbuoL2k6dWpuM913qRA6c_0M1Wjp0vy9vg20%3D",
    "sid_ucp_v1": "1.0.0-KGEyMGFkZTZmNzZhNTBkMDkwMmRiNzEwNTMyNDRiY2NmMjllZTBlNmQKGQjsxsCd_63gAxD_8cvIBhiwISAMOAJA8QcaAmhsIiBkNzgwM2M5NmFkNGFhYjdmZTM0ZmJiYzNlZTJjZmU3YQ",
    "ssid_ucp_v1": "1.0.0-KGEyMGFkZTZmNzZhNTBkMDkwMmRiNzEwNTMyNDRiY2NmMjllZTBlNmQKGQjsxsCd_63gAxD_8cvIBhiwISAMOAJA8QcaAmhsIiBkNzgwM2M5NmFkNGFhYjdmZTM0ZmJiYzNlZTJjZmU3YQ",
    "COMPASS_LUOPAN_DT": "session_7571386301933699354"
},
{
    "s_v_web_id": "verify_mhssab4k_qeb0nndW_FsBA_4n2w_85tp_w70Be4t77YKX",
    "passport_csrf_token": "422478b96966a54ed4e3e0950dfa4d12",
    "passport_csrf_token_default": "422478b96966a54ed4e3e0950dfa4d12",
    "Hm_lvt_b6520b076191ab4b36812da4c90f7a5e": "1762757474",
    "ttcid": "fec7a21c85794eddba2a1ab9550f6bf526",
    "tt_scid": "KWw2MpgIfST62-7ivMxRppwuDKzHm3ca6jtBQ1buFGfi3B5hdvG9blMVXEU-YuOe9a18",
    "passport_mfa_token": "CjfoH2Fg9vdiSaZUWlkEMkIBM5WeO5prbl7fH2FLCjX8rTizeVVtvQBZEcKaC46um4FI5OSLKTN7GkoKPAAAAAAAAAAAAABPsgHqKZC4gKElu%2Fwv9MbEtSa32kX8Iqy5Zi5u3A8SE1sOlvHhkfnGeP2Iq6kbgu2r4BCflYEOGPax0WwgAiIBAzpFSVU%3D",
    "odin_tt": "d750225a2737eaba4a864231feb9356be4f6f76015e1c7d12f2131c6eb66040e5c3237e44949f334e76d51c463b17876934055838dca7cb2623d1b2132f33698",
    "passport_auth_status": "995bdc2eac1d176ec512da03268d8d56%2C",
    "passport_auth_status_ss": "995bdc2eac1d176ec512da03268d8d56%2C",
    "uid_tt": "9610e353f5ff24b72c56f5e761c36d46",
    "uid_tt_ss": "9610e353f5ff24b72c56f5e761c36d46",
    "sid_tt": "d7803c96ad4aab7fe34fbbc3ee2cfe7a",
    "sessionid": "d7803c96ad4aab7fe34fbbc3ee2cfe7a",
    "sessionid_ss": "d7803c96ad4aab7fe34fbbc3ee2cfe7a",
    "is_staff_user": "false",
    "gd_random": "eyJtYXRjaCI6dHJ1ZSwicGVyY2VudCI6MC4wNjQwNjExODcwOTUzNTM2OX0=.Yga3XMVtei4ojHfupvPTUPqE3M6c7meOiIz7mgMGTEw=",
    "zsgw_business_data": "%7B%22uuid%22%3A%22ce5489c0-0602-41b6-80e8-2339199da6e0%22%2C%22platform%22%3A%22pc%22%2C%22source%22%3A%22seo.fxg.jinritemai.com%22%7D",
    "gfkadpd": "4272,23756",
    "ttwid": "1%7CEF4gPxQ21h_nvlWzkU1YsHzOCX8-UthK4Xya9w2QWFc%7C1762758156%7C36702edb91f1cee95841ece9c429875b56fc2c5ba0cebfc3b5e9955884905575",
    "BUYIN_SASID": "SID2_7570997498074333466",
    "COMPASS_LUOPAN_DT": "session_7571386301933699354",
    "csrf_session_id": "aa83547eda0a52a8d0177f63073f3582",
    "source": "seo.fxg.jinritemai.com",
    "ucas_c0": "CkEKBTEuMC4wEKuIg9jYrJeKaRjmJiD3x6C37o3AASiwITDsxsCd_63gA0DqutHIBkjq7o3LBlCzvMvwu7DM_2hYbxIUrTNaPyT8XOdr1eE2GDbsEEYKTdc",
    "ucas_c0_ss": "CkEKBTEuMC4wEKuIg9jYrJeKaRjmJiD3x6C37o3AASiwITDsxsCd_63gA0DqutHIBkjq7o3LBlCzvMvwu7DM_2hYbxIUrTNaPyT8XOdr1eE2GDbsEEYKTdc",
    "sid_guard": "d7803c96ad4aab7fe34fbbc3ee2cfe7a%7C1762942314%7C5184000%7CSun%2C+11-Jan-2026+10%3A11%3A54+GMT",
    "session_tlb_tag": "sttt%7C18%7C14A8lq1Kq3_jT7vD7iz-ev________-34w8iT60p9SymG4wXUcaUcfRFrZwvbzk3xprMEx6vnus%3D",
    "session_tlb_tag_bk": "sttt%7C18%7C14A8lq1Kq3_jT7vD7iz-ev________-34w8iT60p9SymG4wXUcaUcfRFrZwvbzk3xprMEx6vnus%3D",
    "sid_ucp_v1": "1.0.0-KGY5ZDVlYmQzNTFiMDUxNzlkMmY0NTUyYzM0OTk2NTRiNGFjZjMxNmYKGQjsxsCd_63gAxDqutHIBhiwISAMOAJA8QcaAmhsIiBkNzgwM2M5NmFkNGFhYjdmZTM0ZmJiYzNlZTJjZmU3YQ",
    "ssid_ucp_v1": "1.0.0-KGY5ZDVlYmQzNTFiMDUxNzlkMmY0NTUyYzM0OTk2NTRiNGFjZjMxNmYKGQjsxsCd_63gAxDqutHIBhiwISAMOAJA8QcaAmhsIiBkNzgwM2M5NmFkNGFhYjdmZTM0ZmJiYzNlZTJjZmU3YQ",
    "PHPSESSID": "20b9409bf169ba39da75513b2da50d4e",
    "PHPSESSID_SS": "20b9409bf169ba39da75513b2da50d4e",
    "ecom_gray_shop_id": "21346083"
},
{
    "s_v_web_id": "verify_mhssab4k_qeb0nndW_FsBA_4n2w_85tp_w70Be4t77YKX",
    "passport_csrf_token": "422478b96966a54ed4e3e0950dfa4d12",
    "passport_csrf_token_default": "422478b96966a54ed4e3e0950dfa4d12",
    "Hm_lvt_b6520b076191ab4b36812da4c90f7a5e": "1762757474",
    "ttcid": "fec7a21c85794eddba2a1ab9550f6bf526",
    "tt_scid": "KWw2MpgIfST62-7ivMxRppwuDKzHm3ca6jtBQ1buFGfi3B5hdvG9blMVXEU-YuOe9a18",
    "passport_mfa_token": "CjfoH2Fg9vdiSaZUWlkEMkIBM5WeO5prbl7fH2FLCjX8rTizeVVtvQBZEcKaC46um4FI5OSLKTN7GkoKPAAAAAAAAAAAAABPsgHqKZC4gKElu%2Fwv9MbEtSa32kX8Iqy5Zi5u3A8SE1sOlvHhkfnGeP2Iq6kbgu2r4BCflYEOGPax0WwgAiIBAzpFSVU%3D",
    "odin_tt": "d750225a2737eaba4a864231feb9356be4f6f76015e1c7d12f2131c6eb66040e5c3237e44949f334e76d51c463b17876934055838dca7cb2623d1b2132f33698",
    "passport_auth_status": "995bdc2eac1d176ec512da03268d8d56%2C",
    "passport_auth_status_ss": "995bdc2eac1d176ec512da03268d8d56%2C",
    "uid_tt": "9610e353f5ff24b72c56f5e761c36d46",
    "uid_tt_ss": "9610e353f5ff24b72c56f5e761c36d46",
    "sid_tt": "d7803c96ad4aab7fe34fbbc3ee2cfe7a",
    "sessionid": "d7803c96ad4aab7fe34fbbc3ee2cfe7a",
    "sessionid_ss": "d7803c96ad4aab7fe34fbbc3ee2cfe7a",
    "is_staff_user": "false",
    "gd_random": "eyJtYXRjaCI6dHJ1ZSwicGVyY2VudCI6MC4wNjQwNjExODcwOTUzNTM2OX0=.Yga3XMVtei4ojHfupvPTUPqE3M6c7meOiIz7mgMGTEw=",
    "zsgw_business_data": "%7B%22uuid%22%3A%22ce5489c0-0602-41b6-80e8-2339199da6e0%22%2C%22platform%22%3A%22pc%22%2C%22source%22%3A%22seo.fxg.jinritemai.com%22%7D",
    "gfkadpd": "4272,23756",
    "ttwid": "1%7CEF4gPxQ21h_nvlWzkU1YsHzOCX8-UthK4Xya9w2QWFc%7C1762758156%7C36702edb91f1cee95841ece9c429875b56fc2c5ba0cebfc3b5e9955884905575",
    "BUYIN_SASID": "SID2_7570997498074333466",
    "COMPASS_LUOPAN_DT": "session_7571386301933699354",
    "csrf_session_id": "aa83547eda0a52a8d0177f63073f3582",
    "source": "seo.fxg.jinritemai.com",
    "ucas_c0": "CkEKBTEuMC4wEI-Ih8j7speKaRjmJiDcteCGrcy-AiiwITDsxsCd_63gA0Ccu9HIBkic743LBlCAvOGOoLnM_2hYbxIUxEipSwpbHi6D-VhfvB8k_FySWC4",
    "ucas_c0_ss": "CkEKBTEuMC4wEI-Ih8j7speKaRjmJiDcteCGrcy-AiiwITDsxsCd_63gA0Ccu9HIBkic743LBlCAvOGOoLnM_2hYbxIUxEipSwpbHi6D-VhfvB8k_FySWC4",
    "sid_guard": "d7803c96ad4aab7fe34fbbc3ee2cfe7a%7C1762942364%7C5184000%7CSun%2C+11-Jan-2026+10%3A12%3A44+GMT",
    "session_tlb_tag": "sttt%7C20%7C14A8lq1Kq3_jT7vD7iz-ev_________1FS6RIEJIcPkGRbohotbdYggPBYVCVQ4QZ2cGdKA-KPg%3D",
    "session_tlb_tag_bk": "sttt%7C20%7C14A8lq1Kq3_jT7vD7iz-ev_________1FS6RIEJIcPkGRbohotbdYggPBYVCVQ4QZ2cGdKA-KPg%3D",
    "sid_ucp_v1": "1.0.0-KDMxM2MwYWRhZWUzY2IwNzgxM2YyNTc0YzU5Yzc5ZjkwMzcxMzBjMTAKGQjsxsCd_63gAxCcu9HIBhiwISAMOAJA8QcaAmxxIiBkNzgwM2M5NmFkNGFhYjdmZTM0ZmJiYzNlZTJjZmU3YQ",
    "ssid_ucp_v1": "1.0.0-KDMxM2MwYWRhZWUzY2IwNzgxM2YyNTc0YzU5Yzc5ZjkwMzcxMzBjMTAKGQjsxsCd_63gAxCcu9HIBhiwISAMOAJA8QcaAmxxIiBkNzgwM2M5NmFkNGFhYjdmZTM0ZmJiYzNlZTJjZmU3YQ",
    "PHPSESSID": "c9e7b8a6893b64e9d340a0daab7b5025",
    "PHPSESSID_SS": "c9e7b8a6893b64e9d340a0daab7b5025",
    "ecom_gray_shop_id": "129811020"
},
{
    "s_v_web_id": "verify_mhssab4k_qeb0nndW_FsBA_4n2w_85tp_w70Be4t77YKX",
    "passport_csrf_token": "422478b96966a54ed4e3e0950dfa4d12",
    "passport_csrf_token_default": "422478b96966a54ed4e3e0950dfa4d12",
    "Hm_lvt_b6520b076191ab4b36812da4c90f7a5e": "1762757474",
    "ttcid": "fec7a21c85794eddba2a1ab9550f6bf526",
    "tt_scid": "KWw2MpgIfST62-7ivMxRppwuDKzHm3ca6jtBQ1buFGfi3B5hdvG9blMVXEU-YuOe9a18",
    "passport_mfa_token": "CjfoH2Fg9vdiSaZUWlkEMkIBM5WeO5prbl7fH2FLCjX8rTizeVVtvQBZEcKaC46um4FI5OSLKTN7GkoKPAAAAAAAAAAAAABPsgHqKZC4gKElu%2Fwv9MbEtSa32kX8Iqy5Zi5u3A8SE1sOlvHhkfnGeP2Iq6kbgu2r4BCflYEOGPax0WwgAiIBAzpFSVU%3D",
    "odin_tt": "d750225a2737eaba4a864231feb9356be4f6f76015e1c7d12f2131c6eb66040e5c3237e44949f334e76d51c463b17876934055838dca7cb2623d1b2132f33698",
    "passport_auth_status": "995bdc2eac1d176ec512da03268d8d56%2C",
    "passport_auth_status_ss": "995bdc2eac1d176ec512da03268d8d56%2C",
    "uid_tt": "9610e353f5ff24b72c56f5e761c36d46",
    "uid_tt_ss": "9610e353f5ff24b72c56f5e761c36d46",
    "sid_tt": "d7803c96ad4aab7fe34fbbc3ee2cfe7a",
    "sessionid": "d7803c96ad4aab7fe34fbbc3ee2cfe7a",
    "sessionid_ss": "d7803c96ad4aab7fe34fbbc3ee2cfe7a",
    "is_staff_user": "false",
    "gd_random": "eyJtYXRjaCI6dHJ1ZSwicGVyY2VudCI6MC4wNjQwNjExODcwOTUzNTM2OX0=.Yga3XMVtei4ojHfupvPTUPqE3M6c7meOiIz7mgMGTEw=",
    "zsgw_business_data": "%7B%22uuid%22%3A%22ce5489c0-0602-41b6-80e8-2339199da6e0%22%2C%22platform%22%3A%22pc%22%2C%22source%22%3A%22seo.fxg.jinritemai.com%22%7D",
    "gfkadpd": "4272,23756",
    "ttwid": "1%7CEF4gPxQ21h_nvlWzkU1YsHzOCX8-UthK4Xya9w2QWFc%7C1762758156%7C36702edb91f1cee95841ece9c429875b56fc2c5ba0cebfc3b5e9955884905575",
    "BUYIN_SASID": "SID2_7570997498074333466",
    "COMPASS_LUOPAN_DT": "session_7571386301933699354",
    "csrf_session_id": "aa83547eda0a52a8d0177f63073f3582",
    "source": "seo.fxg.jinritemai.com",
    "ucas_c0": "CkEKBTEuMC4wEKOIhZrGuJeKaRjmJiDkqqC2h8yfAiiwITDsxsCd_63gA0DIu9HIBkjI743LBlCbvNyU85fM_2hYbxIUGskdUI3EPOaw40SLFRz6RbbhBtU",
    "ucas_c0_ss": "CkEKBTEuMC4wEKOIhZrGuJeKaRjmJiDkqqC2h8yfAiiwITDsxsCd_63gA0DIu9HIBkjI743LBlCbvNyU85fM_2hYbxIUGskdUI3EPOaw40SLFRz6RbbhBtU",
    "sid_guard": "d7803c96ad4aab7fe34fbbc3ee2cfe7a%7C1762942408%7C5184000%7CSun%2C+11-Jan-2026+10%3A13%3A28+GMT",
    "session_tlb_tag": "sttt%7C10%7C14A8lq1Kq3_jT7vD7iz-ev________-mQhh6tCvWQJ8BubpBpJb0yFDJ6g730MifVnilWP85JCw%3D",
    "session_tlb_tag_bk": "sttt%7C10%7C14A8lq1Kq3_jT7vD7iz-ev________-mQhh6tCvWQJ8BubpBpJb0yFDJ6g730MifVnilWP85JCw%3D",
    "sid_ucp_v1": "1.0.0-KDFkZWQ2ZWMxM2VkZjc5M2Y1OWE5OGVhOTg3MzMyNmY3ZWE1ZWJiYjYKGQjsxsCd_63gAxDIu9HIBhiwISAMOAJA8QcaAmxxIiBkNzgwM2M5NmFkNGFhYjdmZTM0ZmJiYzNlZTJjZmU3YQ",
    "ssid_ucp_v1": "1.0.0-KDFkZWQ2ZWMxM2VkZjc5M2Y1OWE5OGVhOTg3MzMyNmY3ZWE1ZWJiYjYKGQjsxsCd_63gAxDIu9HIBhiwISAMOAJA8QcaAmxxIiBkNzgwM2M5NmFkNGFhYjdmZTM0ZmJiYzNlZTJjZmU3YQ",
    "PHPSESSID": "623aca1023a0708db403ff4da8781743",
    "PHPSESSID_SS": "623aca1023a0708db403ff4da8781743",
    "ecom_gray_shop_id": "192389228"
}
]
shop_name = [
'宛禾米线官方旗舰店',
'宛禾食品旗舰店',
'宛禾官方旗舰店',
'宛禾米线速食旗舰店'
]

headers = {
    "accept": "application/json, text/plain, */*",
    "accept-language": "zh-CN,zh;q=0.9",
    "content-type": "application/json",
    "origin": "https://fxg.jinritemai.com",
    "priority": "u=1, i",
    "sec-ch-ua": "\"Chromium\";v=\"140\", \"Not=A?Brand\";v=\"24\", \"Google Chrome\";v=\"140\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36",
    "x-secsdk-csrf-token": "000100000001ac9abc2a0370214a7746fca256d3ff90edb0ad32c0a563300821d4f2cc09dfa91876e7b9ce989e95"
}

# cookies = 
for i in range(0,len(cookies_list)):
    cookies = cookies_list[i]
    name = shop_name[i]
    url = "https://fxg.jinritemai.com/governance/shop/penalty/get_compensation_list"
    data = {
        "condition": {
            "quick_condition": "all"
        },
        "sort": {
            "sort_type": 1,
            "sort_params": "create_time"
        },
        "page_tab": "compensation_ticket_v2",
        "page": 0,
        "page_size": 10
    }
    data = json.dumps(data, separators=(',', ':'))
    response = requests.post(url, headers=headers, cookies=cookies, data=data)

    body = response.json()
    data = body['data']['tickets']
    for info in data:
        id = info['ticket_id'] #赔付单id
        object_id = info['object_id'] #赔付对象订单id
        node_name = info['node_name'] #赔付原因
        main_status_text = info['status_text_detail']['main_status_text'] #赔付状态
        standard_appeal_status = info['appeal_info']['standard_appeal_status'] #赔付状态码  20=待申诉  0=申诉中 1=申诉成功
        biz_show_desc = info['penalty_types_text'] #赔付金额
        appeal_begin_time = info['appeal_info']['appeal_begin_time'] #赔付时间
        # json_data = {
        #     "赔付单id": id,
        #     "赔付对象订单id": object_id,
        #     "赔付原因": node_name,
        #     "赔付状态": main_status_text,
        #     "赔付状态码": standard_appeal_status,
        #     "赔付金额": biz_show_desc,
        #     "赔付时间": appeal_begin_time
        # }
        json_data = {
            '店铺':name,
            '赔付原因':node_name,
            '赔付金额':biz_show_desc,

        }
        print(json_data)